/**
 * Defines the main routes in the application.
 * The routes you see here will be anchors '#/' unless specifically configured otherwise.
 */

define(['./app'], function (app) {
    'use strict';
    return app.config(function ($stateProvider,$urlRouterProvider) {

        $urlRouterProvider.otherwise('/error');

        $stateProvider
        //商品类型和参数路由
        .state('goodstypement',{
            url:'/goodstypement',
            templateUrl:'app/goodstype/goodstypement.html',
            params:{
                operate:'find'
            }
        })
        //商品类型添加
        .state('goodstype',{
            url:'/goodstype',
            templateUrl:'app/goodstype/goodstype.html',
            params:{
                operate:'save'
            }
        })
        //商品属性查询
        .state('goodsattributement',{
            url:'/goodsattributement',
            templateUrl:'app/goodsattribute/goodsattributement.html',
            params:{
                operate:'find'
            }
        })
        //商品属性添加
        .state('goodsattribute',{
            url:'/goodsattribute',
            templateUrl:'app/goodsattribute/goodsattribute.html',
            params:{
                operate:'save'
            }
        })
        //商品品牌查询
        .state('brandment',{
            url:'/brandment',
            templateUrl:'app/brand/brandment.html',
            params:{
                operate:'find'
            }
        })
        //商品品牌添加
        .state('brand',{
            url:'/brand',
            templateUrl:'app/brand/brand.html',
            params:{
                'operate':'save'
            }
        })
        //商品类型品牌添加
        .state('goodstypebrand',{
            url:'/goodstypebrand',
            templateUrl:'app/goodstypebrand/goodstypebrand.html',
            params:{
                operate:'save'
            }
        })
        //商品品牌类型查询
        .state('goodstypebrandment',{
            url:'/goodstypebrandment',
            templateUrl:'app/goodstypebrand/goodstypebrandment.html',
            params:{
                operate:'find'
            }
        })
        //sku添加
        .state('productsku',{
            url:'/productsku',
            templateUrl:'app/productsku/productsku.html',
            params:{
                operate:'save'
            }
        })
        //sku查询
        .state('productskument',{
            url:'/productskument',
            templateUrl:'app/productsku/productskument.html',
            params:{
                operate:'find'
            }
        })
        //商品分类添加
        .state('goodscategory',{
            url:'/goodscategory',
            templateUrl:'app/goodscategory/goodscategory.html',
            params:{
                operate:'save'
            }
        })
        //商品分类查询
        .state('goodscategoryment',{
            url:'/goodscategoryment',
            templateUrl:'app/goodscategory/goodscategoryment.html',
            params:{
                operate:'find'
            }
        })
        //商品添加
        .state('goods',{
            url:'/goods',
            templateUrl:'app/goods/goods.html',
            params:{
                'operate': 'save'
            }
        })
        //商品查询
        .state('goodsment',{
            url:'/goodsment',
            templateUrl:'app/goods/goodsment.html',
            params:{
                operate:'find'
            }
        })
        //货物添加
        .state('products',{
            url:'/products',
            templateUrl:'app/products/products.html',
            params:{
                'operate': 'save'
            }
        })
        //货物列表
        .state("productsment",{
            url:"/productsment",
            templateUrl:"app/products/productsment.html",
            params:{
                operate:'find'
            }
        })
        //商品评论添加
        .state("goodscomment",{
            url:"/goodscomment",
            templateUrl:"app/goodscomment/goodscomment.html",
            params:{
                operate:'save'
            }
        })
        //商品所有评论查询
        .state("goodscommentment",{
            url:"/goodscommentment",
            templateUrl:"app/goodscomment/goodscommentment.html",
            params:{
                operate:'find'
            }
        })
        //单个商品的所有评论查询
        .state("goodscommentonement",{
            url:"/goodscommentonement",
            templateUrl:"app/goodscomment/goodscommentonement.html",
            params:{
                operate:'find'
            }
        })
        //回复评论
        .state("goodscommentreply",{
            url:"/goodscommentreply",
            templateUrl:"app/goodscomment/goodscommentreply.html",
            params:{
                operate:''
            }
        })
        //回复评论
        .state("goodscommentreplyment",{
            url:"/goodscommentreplyment",
            templateUrl:"app/goodscomment/goodscommentreplyment.html",
            params:{
                operate:''
            }
        })
        //添加专题信息
        .state("goodsspecial",{
            url:"/goodsspecial",
            templateUrl:"app/goodsspecial/goodsspecial.html",
            params:{
                'operate': 'save'
            }
        })
        //查询专题
        .state("goodsspecialment",{
            url:"/goodsspecialment",
            templateUrl:"app/goodsspecial/goodsspecialment.html",
            params:{
                'operate': 'find'
            }
        })
        //查看专题商品
        .state("goodsspecialcontent",{
            url:"/goodsspecialcontent",
            templateUrl:"app/goodsspecial/goodsspecialcontent.html",
            params:{
                'operate':'edit'
            }
        })


    });
});
